<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<script>
// 面向对象思想
// 表现力的JSON 对象字面量
// let 变量 关键字
// key:value,
// typeof   object
let zzp = {
    name: '小帅',//字符串 string
    hometown: '上饶',
    age: 18,// number 不适合计算 数值类型
    sex: '男',
    hobbies: ['学习','乒乓球'],// object
    isSingle: true,
    job: null,
    sendFlower: function(target) {
        target.receiveFlower(zzp);
    }
}
let a;
let xm = {
    xq: 30,
    name: '小美',
    hometown: '赣州',
    receiveFlower: function(sender) {
        console.log('小美收到了'+sender.name+'花');
        if (this.xq < 80){
            console.log('不约,我们不约');
        }else{
            console.log('硕果走一波');
        }

    }
}
let xh = {
    name: '小红',
    hometown: '上饶',
    receiveFlower: function(sender) {
        setTimeout(function() {
            xm.xq = 90;
            xm.receiveFlower(sender);
        },3000)
        //  console.log('小红收到了'+sender.name+'花');
        //  xm.receiveFlower(sender);
         
        //  if (sender.name === '小帅'){
        //      console.log('让我们在一起吧...');
        //   }
     }
}
</script>   
</body>
</html>